﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace LianXi1013.Entity.Migrations
{
    public partial class First : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "RouteInfor",
                columns: table => new
                {
                    RouteInforId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    RouteName = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RouteInfor", x => x.RouteInforId);
                });

            migrationBuilder.CreateTable(
                name: "UserInfor",
                columns: table => new
                {
                    UserInforId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Password = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserInfor", x => x.UserInforId);
                });

            migrationBuilder.CreateTable(
                name: "UserRouteInfor",
                columns: table => new
                {
                    UserRouteInforId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserInforId = table.Column<int>(type: "int", nullable: false),
                    RouteInforId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserRouteInfor", x => x.UserRouteInforId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "RouteInfor");

            migrationBuilder.DropTable(
                name: "UserInfor");

            migrationBuilder.DropTable(
                name: "UserRouteInfor");
        }
    }
}
